The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne -7\) and \(x\ne 2\)).
Expand the right side of the equation. Gather the linear coefficient and the constant.
\[3x-33 = (A+B)x+(-2A+7B)\]
The equation must be true FOR ALL values of \(x\). This means the linear coefficients must be equal, and the constants must be equal.
\[\begin{align}
3 &= A + B \\
-33 &= -2A+7B\\
\end{align}\]
Use elimination. Multiply the first equation by 2.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne -5\) and \(x\ne -8\)).
Expand the right side of the equation. Gather the linear coefficient and the constant.
\[5x+46 = (A+B)x+(8A+5B)\]
The equation must be true FOR ALL values of \(x\). This means the linear coefficients must be equal, and the constants must be equal.
\[\begin{align}
5 &= A + B \\
46 &= 8A+5B\\
\end{align}\]
Use elimination. Multiply the first equation by -8.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne 2\) and \(x\ne -9\)).
Expand the right side of the equation. Gather the linear coefficient and the constant.
\[-12x-64 = (A+B)x+(9A-2B)\]
The equation must be true FOR ALL values of \(x\). This means the linear coefficients must be equal, and the constants must be equal.
\[\begin{align}
-12 &= A + B \\
-64 &= 9A-2B\\
\end{align}\]
Use elimination. Multiply the first equation by -9.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne 6\) and \(x\ne -2\)).
Expand the right side of the equation. Gather the linear coefficient and the constant.
\[13x-38 = (A+B)x+(2A-6B)\]
The equation must be true FOR ALL values of \(x\). This means the linear coefficients must be equal, and the constants must be equal.
\[\begin{align}
13 &= A + B \\
-38 &= 2A-6B\\
\end{align}\]
Use elimination. Multiply the first equation by -2.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne 3\) and \(x\ne -7\)).
Expand the right side of the equation. Gather the linear coefficient and the constant.
\[-7x-29 = (A+B)x+(7A-3B)\]
The equation must be true FOR ALL values of \(x\). This means the linear coefficients must be equal, and the constants must be equal.
\[\begin{align}
-7 &= A + B \\
-29 &= 7A-3B\\
\end{align}\]
Use elimination. Multiply the first equation by -7.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne -6\) and \(x\ne -9\)).
Expand the right side of the equation. Gather the linear coefficient and the constant.
\[9x+60 = (A+B)x+(9A+6B)\]
The equation must be true FOR ALL values of \(x\). This means the linear coefficients must be equal, and the constants must be equal.
\[\begin{align}
9 &= A + B \\
60 &= 9A+6B\\
\end{align}\]
Use elimination. Multiply the first equation by -9.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne 2\) and \(x\ne 6\)).
Expand the right side of the equation. Gather the linear coefficient and the constant.
\[13x-42 = (A+B)x+(-6A-2B)\]
The equation must be true FOR ALL values of \(x\). This means the linear coefficients must be equal, and the constants must be equal.
\[\begin{align}
13 &= A + B \\
-42 &= -6A-2B\\
\end{align}\]
Use elimination. Multiply the first equation by 6.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne -8\) and \(x\ne 3\)).
Expand the right side of the equation. Gather the linear coefficient and the constant.
\[13x+60 = (A+B)x+(-3A+8B)\]
The equation must be true FOR ALL values of \(x\). This means the linear coefficients must be equal, and the constants must be equal.
\[\begin{align}
13 &= A + B \\
60 &= -3A+8B\\
\end{align}\]
Use elimination. Multiply the first equation by 3.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne 9\) and \(x\ne 5\)).
Expand the right side of the equation. Gather the linear coefficient and the constant.
\[-4x+52 = (A+B)x+(-5A-9B)\]
The equation must be true FOR ALL values of \(x\). This means the linear coefficients must be equal, and the constants must be equal.
\[\begin{align}
-4 &= A + B \\
52 &= -5A-9B\\
\end{align}\]
Use elimination. Multiply the first equation by 5.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne -5\) and \(x\ne -2\)).
Expand the right side of the equation. Gather the linear coefficient and the constant.
\[-15x-51 = (A+B)x+(2A+5B)\]
The equation must be true FOR ALL values of \(x\). This means the linear coefficients must be equal, and the constants must be equal.
\[\begin{align}
-15 &= A + B \\
-51 &= 2A+5B\\
\end{align}\]
Use elimination. Multiply the first equation by -2.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 3\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 9\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne -7\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 2\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 7\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 4\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne -2\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 4\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne -6\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.
The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 3\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.
var("w x y z") #these will be our algebraic variableseq1 =-w-3*x-6*y-2*z==25eq2 =-3*w+5*x-y-5*z==1eq3 =-3*w-3*x+4*y-3*z==-59eq4 =4*w-2*x-y-2*z==-16sol = solve([eq1,eq2,eq3,eq4],[w,x,y,z])print(sol)
var("w x y z") #these will be our algebraic variableseq1 =4*w+3*x+y-5*z==22eq2 = w+x+y-z==12eq3 =-2*w-2*x-5*y-z==-51eq4 =-4*w+x-y-z==-26sol = solve([eq1,eq2,eq3,eq4],[w,x,y,z])print(sol)
var("w x y z") #these will be our algebraic variableseq1 = w+3*x-4*y+3*z==83eq2 =-3*w-4*x-2*y-3*z==-41eq3 =6*w+x+6*y-6*z==-76eq4 =-6*w-2*x-2*y+z==-3sol = solve([eq1,eq2,eq3,eq4],[w,x,y,z])print(sol)
var("w x y z") #these will be our algebraic variableseq1 =2*w-4*x+y+2*z==-3eq2 =2*w-5*x+4*y+5*z==28eq3 =-5*w+x-6*y+z==-51eq4 =-3*w+x-6*y-6*z==-70sol = solve([eq1,eq2,eq3,eq4],[w,x,y,z])print(sol)
var("w x y z") #these will be our algebraic variableseq1 =4*w+3*x+6*y-6*z==77eq2 =-w-x-2*y+5*z==-41eq3 =4*w-6*x+4*y-4*z==38eq4 =2*w-2*x+2*y+3*z==-8sol = solve([eq1,eq2,eq3,eq4],[w,x,y,z])print(sol)
var("w x y z") #these will be our algebraic variableseq1 =6*w+6*x-2*y-6*z==-28eq2 =3*w-3*x+3*y-4*z==64eq3 =-5*w+4*x+5*y-4*z==23eq4 = w+x-y+3*z==-26sol = solve([eq1,eq2,eq3,eq4],[w,x,y,z])print(sol)
var("w x y z") #these will be our algebraic variableseq1 =6*w+3*x+2*y+z==4eq2 = w+6*x-4*y-6*z==-10eq3 =-2*w-x-y+4*z==-3eq4 =-6*w-x+4*y+6*z==30sol = solve([eq1,eq2,eq3,eq4],[w,x,y,z])print(sol)
var("w x y z") #these will be our algebraic variableseq1 =-w+4*x+6*y-2*z==-67eq2 =3*w+2*x+2*y+3*z==-49eq3 =3*w-4*x-4*y+4*z==37eq4 =-6*w+5*x+2*y+4*z==16sol = solve([eq1,eq2,eq3,eq4],[w,x,y,z])print(sol)
var("w x y z") #these will be our algebraic variableseq1 = w-5*x-3*y+3*z==-7eq2 =4*w-4*x-y+z==-41eq3 =4*w-3*x-2*y-5*z==-30eq4 =-4*w+x-3*y-z==57sol = solve([eq1,eq2,eq3,eq4],[w,x,y,z])print(sol)
var("w x y z") #these will be our algebraic variableseq1 =-4*w+x+2*y+4*z==-16eq2 =-4*w-4*x-3*y+3*z==5eq3 =-4*w+5*x+6*y+4*z==-32eq4 =-2*w+6*x-2*y+z==-63sol = solve([eq1,eq2,eq3,eq4],[w,x,y,z])print(sol)
Gather similar terms (with same degree of \(x\)) to identify the coefficients.
\[(-13)x^2+(-14)x+(3) ~~=~~ (A+B+C)x^2+(-3A+5B-2C)x+(-10A+6B-15C)\]
Corresponding coefficients must be equal for the above equivalence to hold for all \(x\).
Gather similar terms (with same degree of \(x\)) to identify the coefficients.
\[(-4)x^2+(-9)x+(13) ~~=~~ (A+B+C)x^2+(8A+5B+7C)x+(15A+6B+10C)\]
Corresponding coefficients must be equal for the above equivalence to hold for all \(x\).
Gather similar terms (with same degree of \(x\)) to identify the coefficients.
\[(-5)x^2+(-14)x+(12) ~~=~~ (A+B+C)x^2+(5A+8B+9C)x+(6A+12B+18C)\]
Corresponding coefficients must be equal for the above equivalence to hold for all \(x\).
Gather similar terms (with same degree of \(x\)) to identify the coefficients.
\[(-7)x^2+(-9)x+(18) ~~=~~ (A+B+C)x^2+(2A+3B-5C)x+(-15A-10B+6C)\]
Corresponding coefficients must be equal for the above equivalence to hold for all \(x\).
Gather similar terms (with same degree of \(x\)) to identify the coefficients.
\[(-4)x^2+(9)x+(19) ~~=~~ (A+B+C)x^2+(-8A-5B-7C)x+(15A+6B+10C)\]
Corresponding coefficients must be equal for the above equivalence to hold for all \(x\).
Gather similar terms (with same degree of \(x\)) to identify the coefficients.
\[(-11)x^2+(8)x+(12) ~~=~~ (A+B+C)x^2+(-5A+3B+4C)x+(6A-18B-12C)\]
Corresponding coefficients must be equal for the above equivalence to hold for all \(x\).
Gather similar terms (with same degree of \(x\)) to identify the coefficients.
\[(-10)x^2+(-7)x+(5) ~~=~~ (A+B+C)x^2+(5A-3B-2C)x+(6A-10B-15C)\]
Corresponding coefficients must be equal for the above equivalence to hold for all \(x\).
Gather similar terms (with same degree of \(x\)) to identify the coefficients.
\[(3)x^2+(11)x+(16) ~~=~~ (A+B+C)x^2+(8A+5B+7C)x+(15A+6B+10C)\]
Corresponding coefficients must be equal for the above equivalence to hold for all \(x\).
Gather similar terms (with same degree of \(x\)) to identify the coefficients.
\[(-11)x^2+(-11)x+(10) ~~=~~ (A+B+C)x^2+(5A-B-2C)x+(6A-12B-8C)\]
Corresponding coefficients must be equal for the above equivalence to hold for all \(x\).
Gather similar terms (with same degree of \(x\)) to identify the coefficients.
\[(2)x^2+(-3)x+(18) ~~=~~ (A+B+C)x^2+(-5A-8B-9C)x+(6A+12B+18C)\]
Corresponding coefficients must be equal for the above equivalence to hold for all \(x\).
A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.
There are 2 rows and 3 columns. We say, “It is a 2 by 3 matrix.” We write the dimensions as 2 \(\times\) 3.
Question
A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.
There are 7 rows and 3 columns. We say, “It is a 7 by 3 matrix.” We write the dimensions as 7 \(\times\) 3.
Question
A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.
There are 4 rows and 7 columns. We say, “It is a 4 by 7 matrix.” We write the dimensions as 4 \(\times\) 7.
Question
A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.
There are 2 rows and 7 columns. We say, “It is a 2 by 7 matrix.” We write the dimensions as 2 \(\times\) 7.
Question
A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.
There are 4 rows and 7 columns. We say, “It is a 4 by 7 matrix.” We write the dimensions as 4 \(\times\) 7.
Question
A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.
There are 4 rows and 7 columns. We say, “It is a 4 by 7 matrix.” We write the dimensions as 4 \(\times\) 7.
Question
A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.
There are 4 rows and 3 columns. We say, “It is a 4 by 3 matrix.” We write the dimensions as 4 \(\times\) 3.
Question
A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.
There are 3 rows and 6 columns. We say, “It is a 3 by 6 matrix.” We write the dimensions as 3 \(\times\) 6.
Question
A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.
There are 2 rows and 5 columns. We say, “It is a 2 by 5 matrix.” We write the dimensions as 2 \(\times\) 5.
Question
A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.
There are 3 rows and 4 columns. We say, “It is a 3 by 4 matrix.” We write the dimensions as 3 \(\times\) 4.
Question
If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication\(AB\) is only possible if \(n=p\).
The number of columns of \(A\) is NOT equal to the number of rows of \(B\), so we can NOT find the product \(AB\).
Question
If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication\(AB\) is only possible if \(n=p\).
The number of columns of \(A\) is NOT equal to the number of rows of \(B\), so we can NOT find the product \(AB\).
Question
If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication\(AB\) is only possible if \(n=p\).
The number of columns of \(A\) is equal to the number of rows of \(B\), so we can find the product \(AB\).
The dimensions of the product \(C=AB\) would be \(2\times3\).
Question
If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication\(AB\) is only possible if \(n=p\).
The number of columns of \(A\) is equal to the number of rows of \(B\), so we can find the product \(AB\).
The dimensions of the product \(C=AB\) would be \(3\times5\).
Question
If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication\(AB\) is only possible if \(n=p\).
The number of columns of \(A\) is equal to the number of rows of \(B\), so we can find the product \(AB\).
The dimensions of the product \(C=AB\) would be \(5\times3\).
Question
If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication\(AB\) is only possible if \(n=p\).
The number of columns of \(A\) is equal to the number of rows of \(B\), so we can find the product \(AB\).
The dimensions of the product \(C=AB\) would be \(3\times5\).
Question
If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication\(AB\) is only possible if \(n=p\).
The number of columns of \(A\) is equal to the number of rows of \(B\), so we can find the product \(AB\).
The dimensions of the product \(C=AB\) would be \(4\times2\).
Question
If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication\(AB\) is only possible if \(n=p\).
The number of columns of \(A\) is equal to the number of rows of \(B\), so we can find the product \(AB\).
The dimensions of the product \(C=AB\) would be \(5\times3\).
Question
If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication\(AB\) is only possible if \(n=p\).
The number of columns of \(A\) is NOT equal to the number of rows of \(B\), so we can NOT find the product \(AB\).
Question
If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication\(AB\) is only possible if \(n=p\).
To find the product matrix’s value in row 1 and column 1, sum the products of corresponding elements of row 1 in matrix A and column 1 in matrix B.
\[C_{[1,1]}=(-1)(6)+(0)(6)+(1)(6)=0\]
To find the product matrix’s value in row 1 and column 2, sum the products of corresponding elements of row 1 in matrix A and column 2 in matrix B.
\[C_{[1,2]}=(-1)(-1)+(0)(3)+(1)(-5)=-4\]
To find the product matrix’s value in row 1 and column 3, sum the products of corresponding elements of row 1 in matrix A and column 3 in matrix B.
\[C_{[1,3]}=(-1)(1)+(0)(7)+(1)(-2)=-3\]
To find the product matrix’s value in row 1 and column 4, sum the products of corresponding elements of row 1 in matrix A and column 4 in matrix B.
\[C_{[1,4]}=(-1)(9)+(0)(-4)+(1)(7)=-2\]
To find the product matrix’s value in row 2 and column 1, sum the products of corresponding elements of row 2 in matrix A and column 1 in matrix B.
\[C_{[2,1]}=(4)(6)+(7)(6)+(2)(6)=78\]
To find the product matrix’s value in row 2 and column 2, sum the products of corresponding elements of row 2 in matrix A and column 2 in matrix B.
\[C_{[2,2]}=(4)(-1)+(7)(3)+(2)(-5)=7\]
To find the product matrix’s value in row 2 and column 3, sum the products of corresponding elements of row 2 in matrix A and column 3 in matrix B.
\[C_{[2,3]}=(4)(1)+(7)(7)+(2)(-2)=49\]
To find the product matrix’s value in row 2 and column 4, sum the products of corresponding elements of row 2 in matrix A and column 4 in matrix B.
\[C_{[2,4]}=(4)(9)+(7)(-4)+(2)(7)=22\]
To find the product matrix’s value in row 1 and column 1, sum the products of corresponding elements of row 1 in matrix A and column 1 in matrix B.
\[C_{[1,1]}=(-2)(-9)+(-2)(9)+(7)(0)=0\]
To find the product matrix’s value in row 1 and column 2, sum the products of corresponding elements of row 1 in matrix A and column 2 in matrix B.
\[C_{[1,2]}=(-2)(-4)+(-2)(3)+(7)(8)=58\]
To find the product matrix’s value in row 2 and column 1, sum the products of corresponding elements of row 2 in matrix A and column 1 in matrix B.
\[C_{[2,1]}=(-3)(-9)+(-7)(9)+(4)(0)=-36\]
To find the product matrix’s value in row 2 and column 2, sum the products of corresponding elements of row 2 in matrix A and column 2 in matrix B.
\[C_{[2,2]}=(-3)(-4)+(-7)(3)+(4)(8)=23\]
To find the product matrix’s value in row 3 and column 1, sum the products of corresponding elements of row 3 in matrix A and column 1 in matrix B.
\[C_{[3,1]}=(-2)(-9)+(6)(9)+(5)(0)=72\]
To find the product matrix’s value in row 3 and column 2, sum the products of corresponding elements of row 3 in matrix A and column 2 in matrix B.
\[C_{[3,2]}=(-2)(-4)+(6)(3)+(5)(8)=66\]
To find the product matrix’s value in row 4 and column 1, sum the products of corresponding elements of row 4 in matrix A and column 1 in matrix B.
\[C_{[4,1]}=(3)(-9)+(-7)(9)+(7)(0)=-90\]
To find the product matrix’s value in row 4 and column 2, sum the products of corresponding elements of row 4 in matrix A and column 2 in matrix B.
\[C_{[4,2]}=(3)(-4)+(-7)(3)+(7)(8)=23\]
To find the product matrix’s value in row 1 and column 1, sum the products of corresponding elements of row 1 in matrix A and column 1 in matrix B.
\[C_{[1,1]}=(0)(-5)+(4)(-8)+(-1)(0)+(3)(7)=-11\]
To find the product matrix’s value in row 1 and column 2, sum the products of corresponding elements of row 1 in matrix A and column 2 in matrix B.
\[C_{[1,2]}=(0)(-6)+(4)(-4)+(-1)(-3)+(3)(8)=11\]
To find the product matrix’s value in row 2 and column 1, sum the products of corresponding elements of row 2 in matrix A and column 1 in matrix B.
\[C_{[2,1]}=(-6)(-5)+(8)(-8)+(0)(0)+(7)(7)=15\]
To find the product matrix’s value in row 2 and column 2, sum the products of corresponding elements of row 2 in matrix A and column 2 in matrix B.
\[C_{[2,2]}=(-6)(-6)+(8)(-4)+(0)(-3)+(7)(8)=60\]
To find the product matrix’s value in row 3 and column 1, sum the products of corresponding elements of row 3 in matrix A and column 1 in matrix B.
\[C_{[3,1]}=(-8)(-5)+(-8)(-8)+(2)(0)+(-2)(7)=90\]
To find the product matrix’s value in row 3 and column 2, sum the products of corresponding elements of row 3 in matrix A and column 2 in matrix B.
\[C_{[3,2]}=(-8)(-6)+(-8)(-4)+(2)(-3)+(-2)(8)=58\]
To find the product matrix’s value in row 1 and column 1, sum the products of corresponding elements of row 1 in matrix A and column 1 in matrix B.
\[C_{[1,1]}=(-6)(-3)+(-4)(-9)+(0)(1)=54\]
To find the product matrix’s value in row 1 and column 2, sum the products of corresponding elements of row 1 in matrix A and column 2 in matrix B.
\[C_{[1,2]}=(-6)(-3)+(-4)(5)+(0)(-1)=-2\]
To find the product matrix’s value in row 2 and column 1, sum the products of corresponding elements of row 2 in matrix A and column 1 in matrix B.
\[C_{[2,1]}=(-3)(-3)+(-6)(-9)+(-3)(1)=60\]
To find the product matrix’s value in row 2 and column 2, sum the products of corresponding elements of row 2 in matrix A and column 2 in matrix B.
\[C_{[2,2]}=(-3)(-3)+(-6)(5)+(-3)(-1)=-18\]
To find the product matrix’s value in row 3 and column 1, sum the products of corresponding elements of row 3 in matrix A and column 1 in matrix B.
\[C_{[3,1]}=(1)(-3)+(0)(-9)+(-2)(1)=-5\]
To find the product matrix’s value in row 3 and column 2, sum the products of corresponding elements of row 3 in matrix A and column 2 in matrix B.
\[C_{[3,2]}=(1)(-3)+(0)(5)+(-2)(-1)=-1\]
To find the product matrix’s value in row 4 and column 1, sum the products of corresponding elements of row 4 in matrix A and column 1 in matrix B.
\[C_{[4,1]}=(7)(-3)+(-4)(-9)+(0)(1)=15\]
To find the product matrix’s value in row 4 and column 2, sum the products of corresponding elements of row 4 in matrix A and column 2 in matrix B.
\[C_{[4,2]}=(7)(-3)+(-4)(5)+(0)(-1)=-41\]
To find the product matrix’s value in row 1 and column 1, sum the products of corresponding elements of row 1 in matrix A and column 1 in matrix B.
\[C_{[1,1]}=(-2)(-3)+(4)(5)+(8)(-7)+(-3)(8)=-54\]
To find the product matrix’s value in row 1 and column 2, sum the products of corresponding elements of row 1 in matrix A and column 2 in matrix B.
\[C_{[1,2]}=(-2)(-4)+(4)(-8)+(8)(1)+(-3)(-6)=2\]
To find the product matrix’s value in row 2 and column 1, sum the products of corresponding elements of row 2 in matrix A and column 1 in matrix B.
\[C_{[2,1]}=(-4)(-3)+(-3)(5)+(3)(-7)+(5)(8)=16\]
To find the product matrix’s value in row 2 and column 2, sum the products of corresponding elements of row 2 in matrix A and column 2 in matrix B.
\[C_{[2,2]}=(-4)(-4)+(-3)(-8)+(3)(1)+(5)(-6)=13\]
To find the product matrix’s value in row 3 and column 1, sum the products of corresponding elements of row 3 in matrix A and column 1 in matrix B.
\[C_{[3,1]}=(7)(-3)+(-1)(5)+(1)(-7)+(9)(8)=39\]
To find the product matrix’s value in row 3 and column 2, sum the products of corresponding elements of row 3 in matrix A and column 2 in matrix B.
\[C_{[3,2]}=(7)(-4)+(-1)(-8)+(1)(1)+(9)(-6)=-73\]
To find the product matrix’s value in row 1 and column 1, sum the products of corresponding elements of row 1 in matrix A and column 1 in matrix B.
\[C_{[1,1]}=(0)(-9)+(9)(7)+(7)(-1)=56\]
To find the product matrix’s value in row 1 and column 2, sum the products of corresponding elements of row 1 in matrix A and column 2 in matrix B.
\[C_{[1,2]}=(0)(5)+(9)(-3)+(7)(-7)=-76\]
To find the product matrix’s value in row 2 and column 1, sum the products of corresponding elements of row 2 in matrix A and column 1 in matrix B.
\[C_{[2,1]}=(2)(-9)+(8)(7)+(9)(-1)=29\]
To find the product matrix’s value in row 2 and column 2, sum the products of corresponding elements of row 2 in matrix A and column 2 in matrix B.
\[C_{[2,2]}=(2)(5)+(8)(-3)+(9)(-7)=-77\]
To find the product matrix’s value in row 3 and column 1, sum the products of corresponding elements of row 3 in matrix A and column 1 in matrix B.
\[C_{[3,1]}=(-1)(-9)+(-4)(7)+(9)(-1)=-28\]
To find the product matrix’s value in row 3 and column 2, sum the products of corresponding elements of row 3 in matrix A and column 2 in matrix B.
\[C_{[3,2]}=(-1)(5)+(-4)(-3)+(9)(-7)=-56\]
To find the product matrix’s value in row 4 and column 1, sum the products of corresponding elements of row 4 in matrix A and column 1 in matrix B.
\[C_{[4,1]}=(-3)(-9)+(-9)(7)+(8)(-1)=-44\]
To find the product matrix’s value in row 4 and column 2, sum the products of corresponding elements of row 4 in matrix A and column 2 in matrix B.
\[C_{[4,2]}=(-3)(5)+(-9)(-3)+(8)(-7)=-44\]
To find the product matrix’s value in row 1 and column 1, sum the products of corresponding elements of row 1 in matrix A and column 1 in matrix B.
\[C_{[1,1]}=(5)(-1)+(-3)(-1)+(-2)(1)=-4\]
To find the product matrix’s value in row 1 and column 2, sum the products of corresponding elements of row 1 in matrix A and column 2 in matrix B.
\[C_{[1,2]}=(5)(4)+(-3)(3)+(-2)(8)=-5\]
To find the product matrix’s value in row 2 and column 1, sum the products of corresponding elements of row 2 in matrix A and column 1 in matrix B.
\[C_{[2,1]}=(-3)(-1)+(-9)(-1)+(7)(1)=19\]
To find the product matrix’s value in row 2 and column 2, sum the products of corresponding elements of row 2 in matrix A and column 2 in matrix B.
\[C_{[2,2]}=(-3)(4)+(-9)(3)+(7)(8)=17\]
To find the product matrix’s value in row 3 and column 1, sum the products of corresponding elements of row 3 in matrix A and column 1 in matrix B.
\[C_{[3,1]}=(8)(-1)+(7)(-1)+(-9)(1)=-24\]
To find the product matrix’s value in row 3 and column 2, sum the products of corresponding elements of row 3 in matrix A and column 2 in matrix B.
\[C_{[3,2]}=(8)(4)+(7)(3)+(-9)(8)=-19\]
To find the product matrix’s value in row 4 and column 1, sum the products of corresponding elements of row 4 in matrix A and column 1 in matrix B.
\[C_{[4,1]}=(7)(-1)+(-8)(-1)+(2)(1)=3\]
To find the product matrix’s value in row 4 and column 2, sum the products of corresponding elements of row 4 in matrix A and column 2 in matrix B.
\[C_{[4,2]}=(7)(4)+(-8)(3)+(2)(8)=20\]
To find the product matrix’s value in row 1 and column 1, sum the products of corresponding elements of row 1 in matrix A and column 1 in matrix B.
\[C_{[1,1]}=(-2)(0)+(6)(-1)=-6\]
To find the product matrix’s value in row 1 and column 2, sum the products of corresponding elements of row 1 in matrix A and column 2 in matrix B.
\[C_{[1,2]}=(-2)(-5)+(6)(-7)=-32\]
To find the product matrix’s value in row 1 and column 3, sum the products of corresponding elements of row 1 in matrix A and column 3 in matrix B.
\[C_{[1,3]}=(-2)(9)+(6)(6)=18\]
To find the product matrix’s value in row 2 and column 1, sum the products of corresponding elements of row 2 in matrix A and column 1 in matrix B.
\[C_{[2,1]}=(5)(0)+(0)(-1)=0\]
To find the product matrix’s value in row 2 and column 2, sum the products of corresponding elements of row 2 in matrix A and column 2 in matrix B.
\[C_{[2,2]}=(5)(-5)+(0)(-7)=-25\]
To find the product matrix’s value in row 2 and column 3, sum the products of corresponding elements of row 2 in matrix A and column 3 in matrix B.
\[C_{[2,3]}=(5)(9)+(0)(6)=45\]
To find the product matrix’s value in row 3 and column 1, sum the products of corresponding elements of row 3 in matrix A and column 1 in matrix B.
\[C_{[3,1]}=(-1)(0)+(1)(-1)=-1\]
To find the product matrix’s value in row 3 and column 2, sum the products of corresponding elements of row 3 in matrix A and column 2 in matrix B.
\[C_{[3,2]}=(-1)(-5)+(1)(-7)=-2\]
To find the product matrix’s value in row 3 and column 3, sum the products of corresponding elements of row 3 in matrix A and column 3 in matrix B.
\[C_{[3,3]}=(-1)(9)+(1)(6)=-3\]
To find the product matrix’s value in row 4 and column 1, sum the products of corresponding elements of row 4 in matrix A and column 1 in matrix B.
\[C_{[4,1]}=(-1)(0)+(3)(-1)=-3\]
To find the product matrix’s value in row 4 and column 2, sum the products of corresponding elements of row 4 in matrix A and column 2 in matrix B.
\[C_{[4,2]}=(-1)(-5)+(3)(-7)=-16\]
To find the product matrix’s value in row 4 and column 3, sum the products of corresponding elements of row 4 in matrix A and column 3 in matrix B.
\[C_{[4,3]}=(-1)(9)+(3)(6)=9\]
To find the product matrix’s value in row 1 and column 1, sum the products of corresponding elements of row 1 in matrix A and column 1 in matrix B.
\[C_{[1,1]}=(-9)(6)+(0)(-8)=-54\]
To find the product matrix’s value in row 1 and column 2, sum the products of corresponding elements of row 1 in matrix A and column 2 in matrix B.
\[C_{[1,2]}=(-9)(-6)+(0)(-5)=54\]
To find the product matrix’s value in row 1 and column 3, sum the products of corresponding elements of row 1 in matrix A and column 3 in matrix B.
\[C_{[1,3]}=(-9)(3)+(0)(0)=-27\]
To find the product matrix’s value in row 1 and column 4, sum the products of corresponding elements of row 1 in matrix A and column 4 in matrix B.
\[C_{[1,4]}=(-9)(7)+(0)(4)=-63\]
To find the product matrix’s value in row 2 and column 1, sum the products of corresponding elements of row 2 in matrix A and column 1 in matrix B.
\[C_{[2,1]}=(0)(6)+(2)(-8)=-16\]
To find the product matrix’s value in row 2 and column 2, sum the products of corresponding elements of row 2 in matrix A and column 2 in matrix B.
\[C_{[2,2]}=(0)(-6)+(2)(-5)=-10\]
To find the product matrix’s value in row 2 and column 3, sum the products of corresponding elements of row 2 in matrix A and column 3 in matrix B.
\[C_{[2,3]}=(0)(3)+(2)(0)=0\]
To find the product matrix’s value in row 2 and column 4, sum the products of corresponding elements of row 2 in matrix A and column 4 in matrix B.
\[C_{[2,4]}=(0)(7)+(2)(4)=8\]
To find the product matrix’s value in row 3 and column 1, sum the products of corresponding elements of row 3 in matrix A and column 1 in matrix B.
\[C_{[3,1]}=(0)(6)+(-1)(-8)=8\]
To find the product matrix’s value in row 3 and column 2, sum the products of corresponding elements of row 3 in matrix A and column 2 in matrix B.
\[C_{[3,2]}=(0)(-6)+(-1)(-5)=5\]
To find the product matrix’s value in row 3 and column 3, sum the products of corresponding elements of row 3 in matrix A and column 3 in matrix B.
\[C_{[3,3]}=(0)(3)+(-1)(0)=0\]
To find the product matrix’s value in row 3 and column 4, sum the products of corresponding elements of row 3 in matrix A and column 4 in matrix B.
\[C_{[3,4]}=(0)(7)+(-1)(4)=-4\]
To find the product matrix’s value in row 1 and column 1, sum the products of corresponding elements of row 1 in matrix A and column 1 in matrix B.
\[C_{[1,1]}=(9)(1)+(-3)(6)+(8)(4)=23\]
To find the product matrix’s value in row 1 and column 2, sum the products of corresponding elements of row 1 in matrix A and column 2 in matrix B.
\[C_{[1,2]}=(9)(-6)+(-3)(-7)+(8)(-7)=-89\]
To find the product matrix’s value in row 2 and column 1, sum the products of corresponding elements of row 2 in matrix A and column 1 in matrix B.
\[C_{[2,1]}=(-7)(1)+(3)(6)+(-6)(4)=-13\]
To find the product matrix’s value in row 2 and column 2, sum the products of corresponding elements of row 2 in matrix A and column 2 in matrix B.
\[C_{[2,2]}=(-7)(-6)+(3)(-7)+(-6)(-7)=63\]
To find the product matrix’s value in row 3 and column 1, sum the products of corresponding elements of row 3 in matrix A and column 1 in matrix B.
\[C_{[3,1]}=(4)(1)+(-3)(6)+(-5)(4)=-34\]
To find the product matrix’s value in row 3 and column 2, sum the products of corresponding elements of row 3 in matrix A and column 2 in matrix B.
\[C_{[3,2]}=(4)(-6)+(-3)(-7)+(-5)(-7)=32\]
To find the product matrix’s value in row 4 and column 1, sum the products of corresponding elements of row 4 in matrix A and column 1 in matrix B.
\[C_{[4,1]}=(7)(1)+(0)(6)+(-9)(4)=-29\]
To find the product matrix’s value in row 4 and column 2, sum the products of corresponding elements of row 4 in matrix A and column 2 in matrix B.
\[C_{[4,2]}=(7)(-6)+(0)(-7)+(-9)(-7)=21\]
We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).
\[T = RP\]
After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):
Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)
A
B
C
D
Solution
P = matrix([[4,3,7,5,-4,1,-6,-6,2,-2,-6],[4,-2,-1,5,-1,-2,7,2,4,7,-5]])
theta = 0.93
R = matrix([[cos(theta),-sin(theta)],
[sin(theta),cos(theta)]])
T = R*P
point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)
Question
Matrix of original points (preimage)
A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.
We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).
\[T = RP\]
After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):
Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)
A
B
C
D
Solution
P = matrix([[4,6,1,-6,3,3,5,5,-5,3,-4,-2],[-3,2,6,4,2,-6,-1,3,1,-6,-3,5]])
theta = 4.44
R = matrix([[cos(theta),-sin(theta)],
[sin(theta),cos(theta)]])
T = R*P
point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)
Question
Matrix of original points (preimage)
A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.
We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).
\[T = RP\]
After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):
Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)
A
B
C
D
Solution
P = matrix([[-7,-3,-5,4,-1,7,3,-7,-5,4,-6],[-3,4,-5,7,-1,2,-6,-1,-5,6,0]])
theta = 4.98
R = matrix([[cos(theta),-sin(theta)],
[sin(theta),cos(theta)]])
T = R*P
point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)
Question
Matrix of original points (preimage)
A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.
We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).
\[T = RP\]
After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):
Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)
A
B
C
D
Solution
P = matrix([[3,5,3,3,-5,1,5,-4,1,7,6,2],[-1,0,7,1,0,1,-7,-7,-1,-6,0,-1]])
theta = 5.37
R = matrix([[cos(theta),-sin(theta)],
[sin(theta),cos(theta)]])
T = R*P
point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)
Question
Matrix of original points (preimage)
A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.
We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).
\[T = RP\]
After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):
Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)
A
B
C
D
Solution
P = matrix([[-5,-7,7,-7,6,2,6,-6,-2,6,-5],[-2,0,-6,-1,6,2,-7,1,-1,-7,5]])
theta = 3.36
R = matrix([[cos(theta),-sin(theta)],
[sin(theta),cos(theta)]])
T = R*P
point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)
Question
Matrix of original points (preimage)
A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.
We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).
\[T = RP\]
After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):
Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)
A
B
C
D
Solution
P = matrix([[-2,-4,-4,-7,-4,7,-5,7,7],[-1,-2,6,2,7,-6,-4,-6,7]])
theta = 0.71
R = matrix([[cos(theta),-sin(theta)],
[sin(theta),cos(theta)]])
T = R*P
point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)
Question
Matrix of original points (preimage)
A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.
We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).
\[T = RP\]
After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):
Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)
A
B
C
D
Solution
P = matrix([[-2,2,6,2,-7,5,5,-2,5],[-7,5,4,-6,6,6,-5,6,-3]])
theta = 4.63
R = matrix([[cos(theta),-sin(theta)],
[sin(theta),cos(theta)]])
T = R*P
point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)
Question
Matrix of original points (preimage)
A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.
We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).
\[T = RP\]
After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):
Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)
A
B
C
D
Solution
P = matrix([[-2,-1,0,4,-4,-6,-3,2,6,7,-1,-1],[5,-2,-7,7,6,2,-7,-4,-1,-3,6,-6]])
theta = 1.42
R = matrix([[cos(theta),-sin(theta)],
[sin(theta),cos(theta)]])
T = R*P
point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)
Question
Matrix of original points (preimage)
A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.
We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).
\[T = RP\]
After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):
Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)
A
B
C
D
Solution
P = matrix([[0,-3,-4,-4,6,-4,3,4,-3,6],[3,-1,-2,-4,-4,-5,-2,-7,-5,-7]])
theta = 0.88
R = matrix([[cos(theta),-sin(theta)],
[sin(theta),cos(theta)]])
T = R*P
point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)
Question
Matrix of original points (preimage)
A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.
We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).
\[T = RP\]
After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):
Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)
A
B
C
D
Solution
P = matrix([[7,-5,-4,7,4,-3,1,-6,-2,4,3,-5],[6,-2,5,1,-5,-5,-6,7,-2,0,7,-3]])
theta = 4.12
R = matrix([[cos(theta),-sin(theta)],
[sin(theta),cos(theta)]])
T = R*P
point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)
Horizontal shearing by factor \(k\). \[\begin{bmatrix}1 & k \\ 0 & 1\end{bmatrix}\]
Vertical shearing by factor \(k\). \[\begin{bmatrix}1 & 0 \\ k & 1\end{bmatrix}\]
When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication:
\[X' = CBAX\]
Notice, the order seems backwards; this is standard.
Horizontal shearing by factor \(k\). \[\begin{bmatrix}1 & k \\ 0 & 1\end{bmatrix}\]
Vertical shearing by factor \(k\). \[\begin{bmatrix}1 & 0 \\ k & 1\end{bmatrix}\]
When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication:
\[X' = CBAX\]
Notice, the order seems backwards; this is standard.
Horizontal shearing by factor \(k\). \[\begin{bmatrix}1 & k \\ 0 & 1\end{bmatrix}\]
Vertical shearing by factor \(k\). \[\begin{bmatrix}1 & 0 \\ k & 1\end{bmatrix}\]
When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication:
\[X' = CBAX\]
Notice, the order seems backwards; this is standard.
Horizontal shearing by factor \(k\). \[\begin{bmatrix}1 & k \\ 0 & 1\end{bmatrix}\]
Vertical shearing by factor \(k\). \[\begin{bmatrix}1 & 0 \\ k & 1\end{bmatrix}\]
When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication:
\[X' = CBAX\]
Notice, the order seems backwards; this is standard.
Horizontal shearing by factor \(k\). \[\begin{bmatrix}1 & k \\ 0 & 1\end{bmatrix}\]
Vertical shearing by factor \(k\). \[\begin{bmatrix}1 & 0 \\ k & 1\end{bmatrix}\]
When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication:
\[X' = CBAX\]
Notice, the order seems backwards; this is standard.
Horizontal shearing by factor \(k\). \[\begin{bmatrix}1 & k \\ 0 & 1\end{bmatrix}\]
Vertical shearing by factor \(k\). \[\begin{bmatrix}1 & 0 \\ k & 1\end{bmatrix}\]
When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication:
\[X' = CBAX\]
Notice, the order seems backwards; this is standard.
Horizontal shearing by factor \(k\). \[\begin{bmatrix}1 & k \\ 0 & 1\end{bmatrix}\]
Vertical shearing by factor \(k\). \[\begin{bmatrix}1 & 0 \\ k & 1\end{bmatrix}\]
When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication:
\[X' = CBAX\]
Notice, the order seems backwards; this is standard.
Horizontal shearing by factor \(k\). \[\begin{bmatrix}1 & k \\ 0 & 1\end{bmatrix}\]
Vertical shearing by factor \(k\). \[\begin{bmatrix}1 & 0 \\ k & 1\end{bmatrix}\]
When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication:
\[X' = CBAX\]
Notice, the order seems backwards; this is standard.
Horizontal shearing by factor \(k\). \[\begin{bmatrix}1 & k \\ 0 & 1\end{bmatrix}\]
Vertical shearing by factor \(k\). \[\begin{bmatrix}1 & 0 \\ k & 1\end{bmatrix}\]
When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication:
\[X' = CBAX\]
Notice, the order seems backwards; this is standard.
Horizontal shearing by factor \(k\). \[\begin{bmatrix}1 & k \\ 0 & 1\end{bmatrix}\]
Vertical shearing by factor \(k\). \[\begin{bmatrix}1 & 0 \\ k & 1\end{bmatrix}\]
When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication:
\[X' = CBAX\]
Notice, the order seems backwards; this is standard.
mygraph = Graphics()
X = matrix([[0,1,1,0],[0,0,1,1]])
mygraph += polygon(X.transpose(),color="red",alpha=0.5)
A = matrix([[1,0],
[2.3,1]])
B = matrix([[1,0],
[0,1.9]])
C = matrix([[-0.994,-0.111],
[0.111,-0.994]])
XP = C*B*A*X
mygraph += polygon(XP.transpose(),color="blue",alpha=0.5)
show(mygraph,xmin=-10,xmax=10,ymin=-10,ymax=10,aspect_ratio=1)
Question
One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.
One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.
One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.
One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.
One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.
One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.
One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.
One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.
One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.
One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.
Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):
\[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\]
A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).
In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:
\[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\]
Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).
We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = ######### ENTER YOUR CODE HERE ##############
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = matrix([[0.956256681196475,0.27798757925661,0.0910827395621813],[-0.267130086564853,0.956723891743267,-0.115416254572186],[-0.119225318279955,0.0860366244495171,0.989132459650565]])
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
Instead of calculating each element of the rotation matrix (R), I would recommend putting in the formulas in terms of \(u_x\), \(u_y\), \(u_z\), and \(\theta\). You would need to define those variables before they were referenced:
ux = 0.3259576
uy = 0.3402856
uz = -0.8820189
th = 2*pi/20
Question
Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):
\[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\]
A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).
In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:
\[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\]
Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).
We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = ######### ENTER YOUR CODE HERE ##############
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = matrix([[0.983463939757809,-0.143836376557919,0.110044427277067],[0.167037864820034,0.95520918411058,-0.244282144879981],[-0.0699787890179099,0.258624266783859,0.963439908721918]])
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
Instead of calculating each element of the rotation matrix (R), I would recommend putting in the formulas in terms of \(u_x\), \(u_y\), \(u_z\), and \(\theta\). You would need to define those variables before they were referenced:
ux = 0.8137197
uy = 0.2912837
uz = 0.5030051
th = 2*pi/20
Question
Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):
\[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\]
A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).
In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:
\[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\]
Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).
We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = ######### ENTER YOUR CODE HERE ##############
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = matrix([[0.969742279866997,0.242231566713181,0.0303937283997408],[-0.243528192118999,0.951079009856047,0.1901124316148],[0.0171443950494465,-0.19176179259414,0.981291742867263]])
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
Instead of calculating each element of the rotation matrix (R), I would recommend putting in the formulas in terms of \(u_x\), \(u_y\), \(u_z\), and \(\theta\). You would need to define those variables before they were referenced:
ux = -0.6178855
uy = 0.0214379
uz = -0.7859758
th = 2*pi/20
Question
Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):
\[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\]
A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).
In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:
\[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\]
Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).
We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = ######### ENTER YOUR CODE HERE ##############
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = matrix([[0.955702162146452,0.0699982477474729,0.285890927769455],[-0.0418310537330161,0.993751915602564,-0.103476051238051],[-0.291347799394781,0.0869331671372767,0.952658954841291]])
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
Instead of calculating each element of the rotation matrix (R), I would recommend putting in the formulas in terms of \(u_x\), \(u_y\), \(u_z\), and \(\theta\). You would need to define those variables before they were referenced:
ux = 0.3080886
uy = 0.9339919
uz = -0.1809436
th = 2*pi/20
Question
Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):
\[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\]
A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).
In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:
\[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\]
Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).
We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = ######### ENTER YOUR CODE HERE ##############
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = matrix([[0.976696411476126,0.034213492779094,0.211880996603075],[-0.0812744262320707,0.9726511000662,0.217587465587194],[-0.198641857246414,-0.229737403249591,0.95276552104798]])
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
Instead of calculating each element of the rotation matrix (R), I would recommend putting in the formulas in terms of \(u_x\), \(u_y\), \(u_z\), and \(\theta\). You would need to define those variables before they were referenced:
ux = -0.7237868
uy = 0.6642399
uz = -0.1868634
th = 2*pi/20
Question
Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):
\[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\]
A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).
In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:
\[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\]
Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).
We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = ######### ENTER YOUR CODE HERE ##############
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = matrix([[0.951285530251319,0.286208561141078,0.114632017621694],[-0.283657782696272,0.958159217352581,-0.0383298384828918],[-0.120806052208908,0.00394635678107557,0.992668284986407]])
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
Instead of calculating each element of the rotation matrix (R), I would recommend putting in the formulas in terms of \(u_x\), \(u_y\), \(u_z\), and \(\theta\). You would need to define those variables before they were referenced:
ux = 0.0684043
uy = 0.3809468
uz = -0.9220631
th = 2*pi/20
Question
Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):
\[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\]
A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).
In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:
\[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\]
Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).
We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = ######### ENTER YOUR CODE HERE ##############
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = matrix([[0.958254090771837,-0.281479497040066,0.0501835656875039],[0.27333667791739,0.953359566561581,0.12803357899629],[-0.0838818098524688,-0.108971691698283,0.99049937525689]])
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
Instead of calculating each element of the rotation matrix (R), I would recommend putting in the formulas in terms of \(u_x\), \(u_y\), \(u_z\), and \(\theta\). You would need to define those variables before they were referenced:
ux = -0.3834826
uy = 0.2169223
uz = 0.8977114
th = 2*pi/20
Question
Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):
\[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\]
A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).
In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:
\[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\]
Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).
We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = ######### ENTER YOUR CODE HERE ##############
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = matrix([[0.955534694624625,-0.0431661466381874,0.291702127440022],[0.0708546677181469,0.993855961917377,-0.0850290716392749],[-0.286239521085358,0.101916685315489,0.952722376048305]])
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
Instead of calculating each element of the rotation matrix (R), I would recommend putting in the formulas in terms of \(u_x\), \(u_y\), \(u_z\), and \(\theta\). You would need to define those variables before they were referenced:
ux = 0.3024846
uy = 0.9351292
uz = 0.1844896
th = 2*pi/20
Question
Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):
\[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\]
A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).
In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:
\[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\]
Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).
We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = ######### ENTER YOUR CODE HERE ##############
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = matrix([[0.981177989652168,0.0610238721456914,0.183209824110161],[-0.0143321327006117,0.96915090452915,-0.246051039872996],[-0.192572953953513,0.238794077143209,0.951784138408989]])
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
Instead of calculating each element of the rotation matrix (R), I would recommend putting in the formulas in terms of \(u_x\), \(u_y\), \(u_z\), and \(\theta\). You would need to define those variables before they were referenced:
ux = 0.7844959
uy = 0.6080293
uz = -0.1219286
th = 2*pi/20
Question
Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):
\[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\]
A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).
In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:
\[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\]
Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).
We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = ######### ENTER YOUR CODE HERE ##############
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
n = 20 #The number of frames
X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
[-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
[-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
P = matrix([[1,0,0],
[0,0,1]])
R = matrix([[0.983468765322102,-0.0591498262566556,0.171144633832402],[0.0138198967766875,0.966905482105505,0.254760277765986],[-0.180549710852444,-0.248183574654182,0.951738785162699]])
plots = []
for i in range(n):
XP = P*R^i*X
nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
plots.append(nextplot)
a = animate(plots)
show(a)
Instead of calculating each element of the rotation matrix (R), I would recommend putting in the formulas in terms of \(u_x\), \(u_y\), \(u_z\), and \(\theta\). You would need to define those variables before they were referenced:
ux = -0.8137802
uy = 0.5690534
uz = 0.1180675
th = 2*pi/20